<?php
$this->pageTitle = Yii::app()->name . ' - Contato';
?>

<?php if (Yii::app()->user->hasFlash('contact')): ?>

    <div class="flash-success">
        <?php echo Yii::app()->user->getFlash('contact'); ?>
    </div>   


<div class="lateral_esquerda1"></div>
    <div class="main">
        <div id="content"> 
            <span id="headerPrincpal">CONTATO</span>

            <div class="form contato">

                <?php
                $form = $this->beginWidget('CActiveForm', array(
                    'id' => 'contact-form',
                    'enableClientValidation' => true,
                    'clientOptions' => array(
                        'validateOnSubmit' => true,
                    ),
                        ));
                ?>



                <div id="formContato">

                    <div class="row">
                        <?php echo $form->labelEx($model, 'Nome'); ?><br/>
                        <?php echo $form->textField($model, 'name', array('style' => 'width:470px;')); ?>
                        <?php echo $form->error($model, 'name'); ?>
                    </div>
                    <div class="row"> 
                        <?php echo $form->labelEx($model, 'Telefone'); ?><br/>
                        <?php $this->widget('CMaskedTextField', array('model' => $model, 'attribute' => 'ddd', 'mask' => '(99)', 'htmlOptions' => array('style' => 'width:100px;'))); ?>
                        <?php //echo $form->textField($model, 'ddd', array('style'=>'width:50px;')); ?>                            
                        <?php $this->widget('CMaskedTextField', array('model' => $model, 'attribute' => 'telefone', 'mask' => '9999-9999', 'htmlOptions' => array('style' => 'width:365px;'))); ?>
                        <?php //echo $form->textField($model, 'telefone', array('style'=>'width:317px;')); ?>
                        <?php echo $form->error($model, 'telefone'); ?>
                    </div>
                    <div class="row">
                        <?php echo $form->labelEx($model, 'Cidade'); ?><br/>
                        <?php echo $form->textField($model, 'cidade', array('style' => 'width:470px;')); ?>
                        <?php echo $form->error($model, 'cidade'); ?>
                    </div>
                    <div class="row"> 
                        <?php echo $form->labelEx($model, 'Email'); ?><br/>
                        <?php echo $form->textField($model, 'email', array('style' => 'width:470px;')); ?>
                        <?php echo $form->error($model, 'email'); ?>
                    </div>
                    <div class="row">
                        <?php echo $form->labelEx($model, 'Assunto'); ?>
                        <?php echo $form->textArea($model, 'body', array('style' => 'width:470px;height:90px;')); ?>
                        <?php echo $form->error($model, 'body'); ?>
                    </div>
                    <div class="row buttons"><?php echo CHtml::submitButton('Enviar', array('class' => "botao")); ?></div>

                </div>

                <?php $this->endWidget(); ?>

            </div><!-- form -->

        </div>
    </div>
    <div class="lateral_direita1"></div>
<?php else: ?>

 


<div class="lateral_esquerda1"></div>
    <div class="main">
        <div id="content"> 
            <span id="headerPrincpal">CONTATO</span>

            <div class="form contato">

                <?php
                $form = $this->beginWidget('CActiveForm', array(
                    'id' => 'contact-form',
                    'enableClientValidation' => true,
                    'clientOptions' => array(
                        'validateOnSubmit' => true,
                    ),
                        ));
                ?>



                <div id="formContato">

                    <div class="row">
                        <?php echo $form->labelEx($model, 'Nome'); ?><br/>
                        <?php echo $form->textField($model, 'name', array('style' => 'width:470px;')); ?>
                        <?php echo $form->error($model, 'name'); ?>
                    </div>
                    <div class="row"> 
                        <?php echo $form->labelEx($model, 'Telefone'); ?><br/>
                        <?php $this->widget('CMaskedTextField', array('model' => $model, 'attribute' => 'ddd', 'mask' => '(99)', 'htmlOptions' => array('style' => 'width:100px;'))); ?>
                        <?php //echo $form->textField($model, 'ddd', array('style'=>'width:50px;')); ?>                            
                        <?php $this->widget('CMaskedTextField', array('model' => $model, 'attribute' => 'telefone', 'mask' => '9999-9999', 'htmlOptions' => array('style' => 'width:365px;'))); ?>
                        <?php //echo $form->textField($model, 'telefone', array('style'=>'width:317px;')); ?>
                        <?php echo $form->error($model, 'telefone'); ?>
                    </div>
                    <div class="row">
                        <?php echo $form->labelEx($model, 'Cidade'); ?><br/>
                        <?php echo $form->textField($model, 'cidade', array('style' => 'width:470px;')); ?>
                        <?php echo $form->error($model, 'cidade'); ?>
                    </div>
                    <div class="row"> 
                        <?php echo $form->labelEx($model, 'Email'); ?><br/>
                        <?php echo $form->textField($model, 'email', array('style' => 'width:470px;')); ?>
                        <?php echo $form->error($model, 'email'); ?>
                    </div>
                    <div class="row">
                        <?php echo $form->labelEx($model, 'Assunto'); ?>
                        <?php echo $form->textArea($model, 'body', array('style' => 'width:470px;height:90px;')); ?>
                        <?php echo $form->error($model, 'body'); ?>
                    </div>
                    <div class="row buttons"><?php echo CHtml::submitButton('Enviar', array('class' => "botao")); ?></div>

                </div>

                <?php $this->endWidget(); ?>

            </div><!-- form -->

        </div>
    </div>
    <div class="lateral_direita1"></div>
<?php endif; ?>